import java.util.Scanner;

public class d050_妳那裡現在幾點了 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String input, output;
		int hour;
		
		while(sc.hasNext()) {
			input = sc.nextLine();
			hour = Integer.parseInt(input);
			
			output = "";
			
			while(hour >= 15) {
				output += Integer.toString(hour - 15);
				break;
			}
			
			while(hour < 15) {
				output += Integer.toString(24 + hour - 15);
				break;
			}
			
			System.out.println(output);
		} // next
	} // main
	
}